<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('成交客户信息列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('system:table:edit')}]];
        var removeFlag = [[${@permission.hasPermi('system:table:remove')}]];
        var infos = [[${@permission.hasPermi('system:selectinfo:view')}]];
        var prefix = ctx + "system/table";
        var prefixs = ctx + "system/info";

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                modalName: "成交客户信息",
                columns: [{
                    checkbox: true
                },
                {
                    field: 'id',
                    title: 'id',
                    visible: false
                },
                {
                    field: 'area',
                    title: '地区',
                    sortable: true,
                    formatter: function(value, row, index) {
                        return '<a ' + infos + ' href="javascript:void(0)" onclick="selectInfo(\'' + row.id + '\')">' + value + '</a>';
                    }

                },
                {
                    field: 'remaining',
                    title: '剩余名额'
                },
                {
                    field: 'dealDone',
                    title: '成交名额',
                    sortable: true,
                    formatter: function(value, row, index) {
                        return '<a href="javascript:void(0)" onclick="selectInfo(\'' + row.id + '\')">' + value + '</a>';
                    }
                },]
            };
            $.table.init(options);
        });

        function selectInfo(id) {
            var urls = ctx + "system/info/selectinfo/"+id;
            $.modal.open("已成交客户信息", urls);
        }

    </script>
</body>
</html>